package dao

import(
	
)

func GetAllMedical_record() (error, []models.Employees, int64) {
	var employeeData []models.Employees
	var total int64
	err := db.Table("medical_record").Order("e_number ASC").Find(&employeeData).Error
	return err, employeeData, total
}

func DelMedical_record(e_nunmber int) error {
	err := db.Table("medical_record").Where("sno = ?", mno).Delete(models.Employees{}).Error
	return err
}

func UpdateMedical_record(employees models.Employees) error {
	err := db.Table("medical_record").Where("sno = ?", Medical_record.Mno).Updates(&employees).Error
	return err
}

func AddMedical_record(medical_record models.Medical_record) error {
	err := db.Table("medical_record").Create(&medical_record).Error
	return err
}